package clone;

public class Employee extends Person {
    private double salary;

    public Employee(String name, int id, double salary) {
        super(name, id);
        this.salary = salary;
    }

    public Employee clone() throws CloneNotSupportedException {
        Employee cloned = (Employee) super.clone();
        return cloned;
    }

    public void setSalary(double salary) {
        this.salary = salary;
    }

    @Override
    public String toString() {
        return super.toString() + "[salary=" + this.salary + "]";
    }
}
